 <template>
    <div id="app">
        <router-view></router-view>
        <div class="bottom-nav">
            <router-link class="bottom-nav-item" tag="div" key="1" active-class="active_class" to='/index'>
                <div><i class="iconfont icon-shouye1"></i></div>
                <div><span>首页</span></div>
            </router-link>
            <router-link class="bottom-nav-item" tag="div" key="2" active-class="active_class" to='/classify'>
                <div><i class="iconfont icon-leimupinleifenleileibie1"></i></div>
                <div><span>分类</span></div>
            </router-link>
            <router-link class="bottom-nav-item" tag="div" key="3" active-class="active_class" to='/car'>
                <div><i class="iconfont icon-gouwuche1"></i></div>
                <div><span>购物车</span></div>
            </router-link>
            <router-link class="bottom-nav-item" tag="div" key="4" active-class="active_class"  to='/my'>
                <div><i class="iconfont icon-wode-fuben_fuzhi"></i></div>
                <div><span>我的</span></div>
            </router-link>
        </div>
    </div>
</template>

<script>
    export default {
        name: 'app',
        data () {
            return {
               
            }
        },
        methods: {

        },
        created () {
            
        },
        beforeCreate() {
            let url =  window.location.href.split("#")[0];
            // alert(url);
            this.$http.get('https://api.huoxingy.com/wechat/signature?url='+url).then((res)=>{
                this.returnUrl = res.data.url
                wx.config({
                    debug: false,
                    appId: res.data.appId,
                    timestamp: res.data.timestamp,
                    nonceStr: res.data.nonceStr,
                    signature: res.data.signature,
                    jsApiList: [
                        'checkJsApi',
                        'onMenuShareTimeline',
                        'onMenuShareAppMessage',
                        'onMenuShareQQ',
                        'onMenuShareWeibo',
                        'onMenuShareQZone',
                        'hideMenuItems',
                        'showMenuItems',
                        'hideAllNonBaseMenuItem',
                        'showAllNonBaseMenuItem',
                        'translateVoice',
                        'startRecord',
                        'stopRecord',
                        'onVoiceRecordEnd',
                        'playVoice',
                        'onVoicePlayEnd',
                        'pauseVoice',
                        'stopVoice',
                        'uploadVoice',
                        'downloadVoice',
                        'chooseImage',
                        'previewImage',
                        'uploadImage',
                        'downloadImage',
                        'getNetworkType',
                        'openLocation',
                        'getLocation',
                        'hideOptionMenu',
                        'showOptionMenu',
                        'closeWindow',
                        'scanQRCode',
                        'chooseWXPay',
                        'openProductSpecificView',
                        'addCard',
                        'chooseCard',
                        'openCard'
                    ]
                });
            })
        },
    }
</script>
<style lang="scss">
    #app {
        height: 100%;
        width: 100%;
        background-color: #f6f6f6;
        overflow: hidden;
        .bottom-nav {
            border-top: 1px solid #dddddd;
            display: flex;
            height: .5rem;
            line-height: .5rem;
            position: fixed;
            bottom: 0;
            z-index: 100;
            background-color: #fff;
            width: 100%;
            .bottom-nav-item {
                height: .5rem;
                font-size: .12rem;
                color: #999999;
                flex:1;
                text-align: center;
                padding-top: .05rem;
                box-sizing: border-box;
                div {
                    height: .2rem;
                    line-height: .2rem;
                }
            }
            .active_class {
                color: #ff4f3d;
                font-weight: 600;
            }
        }
    }
</style>
